package cn.xiaobai;

import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;

/**
 * @Author yangdaji
 * @Date 2023/10/25
 * @PackageName cn.xiaobai
 * @ClassName Test
 */
@Mojo(name = "test", defaultPhase = LifecyclePhase.COMPILE)
public class TestMojo extends AbstractMojo {

    @Parameter
    private String classif;

    @Parameter(property = "args")
    private String args;

    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
        System.out.println("执行插件:");
        System.out.println(classif);
        System.out.println(args);
    }
}
